<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/taglibs.jsp"%>
<!DOCTYPE html>
<meta charset="utf-8" />
<html>
<head>
<%@ include file="/taglibs.jsp"%>
<%@ include file="/categorys.jsp"%>
<style>
body {
	background-color: #282e2d;
}

#imgVcode{
    border-left: 1px dashed #ccc;
    position: absolute;
    right: 54px;
    top: 5px;
}
.ipt_line {
    margin-bottom: 12px;
}

#index_login .login_con {
    padding-top: 96px;
}

.login_con .c_show {
    padding-top: 10px;
}

.error_msg_div{
	color: red;
    left: 117px;
    position: relative;
    margin-top: -18px;
}
</style>
<script type="text/javascript">
	$(function() {
		$('#username').focus();
	});
	
	function myReset(){
		document.frm.reset();
		$('#errormsg').html('&nbsp;');
	}

	function enterLogin(event) {
		if (event.keyCode == 13) {
			login();
		}
	}
	
	function login() {
		var flag = true;
		if(!$.trim($('#username').val())) {
			$('#errormsg').html('请输入用户名！');
			return false;
		}
		if(!$.trim($('#password').val())) {
			$('#errormsg').html('请输入密码！');
			return false;
		}
		/* if(!$.trim($('#validateCode').val())) {
			$('#errormsg').html('请输入验证码！');
			return false;
		} */
		
		$('#myform').submit();
	}
	
	function getHW(){
		window.moveTo( 0, 0);//移动窗口
		window.resizeTo(screen.width, screen.height);//改变大小
	}
	
	if (window != top){
		top.location.href = location.href; 
	}  			
</script>
</head>
<body onload="getHW()">
	<div id="content" class="con">
		<div id="index_login">
		    <img src="${res_black}/img/logo/topLogo.png" style="height: 55px;margin-left: 150px;margin-top: 25px;position: absolute;width: 127px;"/>
		    <div style="color:#8E8E8E;font-size:18px;margin-left:300px;margin-top:38px;position:absolute;">运营管理后台</div>
			<div class="login_con">
				<div class="login_con_top"></div>
				<div class="login_con_middle">
					<div class="c_show c_01">
						<form method="post" name="frm" id="myform" action="${ctx}/user/auth" onkeydown="enterLogin(event)">
							<div class="ipt_line">
								<div class="ipt_title">用户名：</div>
								<input type="text" name="username" id="username" data-rules="empty" data-vfield="用户名" value="" class="ipt_220">
							</div>
							<div class="ipt_line">
								<div class="ipt_title">密码：</div>
								<input type="password" name="password" id="password" data-rules="empty" data-vfield="密码" value="" class="ipt_220">
							</div>
							<!-- div class="ipt_line">
								<div class="ipt_title">验证码：</div>
								<input id="validateCode" type="text" name="validateCode" class="ipt_220"/>
								<img id='imgVcode' src="${ctx}/image.action" width="60" height="30" onclick="document.getElementById('imgVcode').src = '${ctx}/image.action?'+(new Date()).getTime()" alt="看不清楚 ？点击换一张" />
							</div -->
							<div class="ipt_line">
								<div class="ipt_title">&nbsp;</div>
								<button type="submit" class="red_120" onclick="javascript:login();return false;">登 录</button>
								<button type="submit" class="red_120" onclick="javascript:myReset();return false;" style="background-color:#74D86A;">重 填</button>
							</div>
							<div style="height:5px;">&nbsp;</div>
							<div id="errormsg" class="error_msg_div">${message}&nbsp;</div>
						</form>
					</div>
				</div>
				<div class="login_con_bottom"></div>
				<img src="${res_black}/img/logo/line.jpg" style="height:22px;margin-left:-42px;margin-top: 18px;position: absolute;width: 510px;"/>
				<div style="color:#3F4847;font-size: 12px;margin-left: 30px;margin-top: 48px;position: absolute;">Copyright © 2004-2017 YIXUN Corporation,All Rights Reserved</div>
			</div>
		</div>
	</div>
</body>
</html>